From: Ray Strode Date: Fri, 10 Jan 2014 14:27:46 +0000 (-0500) Subject: loginDialog: move user list loading after actors are constructed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2932 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=765d0228c04710608c6b674d9ef41af9906480b8;p=gnome-shell.git loginDialog: move user list loading after actors are constructed Right now we queue populating the user list in the middle of setting up the dialog actors. Of course, the actual population happens some time later after going back to the main loop. It's more logical to structure the code so the the actors are instantiated first in one block and then other things after that. This commit moves the user list population enqueuing operation to the bottom of the constuctor. https://bugzilla.gnome.org/show_bug.cgi?id=721868 --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 49ca5ea5a..7810b03e4 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -454,18 +454,6 @@ const LoginDialog = new Lang.Class({ this.actor.add_child(this._logoBin); this._updateLogo(); - if (!this._userManager.is_loaded) - this._userManagerLoadedId = this._userManager.connect('notify::is-loaded', - Lang.bind(this, function() { - if (this._userManager.is_loaded) { - this._loadUserList(); - this._userManager.disconnect(this._userManagerLoadedId); - this._userManagerLoadedId = 0; - } - })); - else - GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList)); - this._userList.connect('activate', Lang.bind(this, function(userList, item) { this._onUserListActivated(item); @@ -481,6 +469,18 @@ const LoginDialog = new Lang.Class({ this._sessionMenuButton.actor.show(); this._authPrompt.addActorToDefaultButtonWell(this._sessionMenuButton.actor); + if (!this._userManager.is_loaded) + this._userManagerLoadedId = this._userManager.connect('notify::is-loaded', + Lang.bind(this, function() { + if (this._userManager.is_loaded) { + this._loadUserList(); + this._userManager.disconnect(this._userManagerLoadedId); + this._userManagerLoadedId = 0; + } + })); + else + GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._loadUserList)); + }, _updateDisableUserList: function() {